package org.zdd.bookstore.model.service;

import org.zdd.bookstore.common.pojo.BSResult;
import org.zdd.bookstore.model.entity.BookInfo;
import org.zdd.bookstore.model.entity.User;
import org.zdd.bookstore.model.entity.custom.Cart;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface ICCartService {

    BSResult addToCart(int userId, int bookId, int buyNum);

    BSResult clearCart(HttpServletRequest request, String sessionName);

    BSResult deleteCartItem(int bookId,int userId);

    BSResult updateBuyNum(int userId,int bookId, int newNum);

    BSResult checkedOrNot(Cart cart,int userId, int bookId);

    BSResult queryByUserId(int userId);

    BSResult selectById(int userId,int bookId);

    BSResult deleteByOrder(int userId);
    BSResult initCart(int userId);


}
